﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InventoryPage.aspx.cs"
    Inherits="WholesaleOnline.WebUI.Pages.InventoryPage" MasterPageFile="~/Master/MasterBase.Master" %>

<%@ Register TagPrefix="uc" TagName="Category" Src="~/UC/CategoryUI.ascx" %>
<%@ Register TagPrefix="uc" TagName="Product" Src="~/UC/PruductUI.ascx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="cphHead" runat="server">
    <script type="text/javascript" src="../js/model/oo.inventory.js"></script>
    <script type="text/javascript">
        $(function () {
            oo('inventory').prop('seller', '<%=Request.QueryString["sellerId"] %>');
            var defaultType = 'NotOrder';
            $('img[type]').each(function () {
                $(this).click(function () {
                    if (!oo('inventory').prop('isComplete')) return;
                    var imgUrl = $(this).attr('src');
                    if (/.+\w+(\d)\.png$/.test(imgUrl) && RegExp.$1 == '0') {
                        $(this).attr('src', imgUrl.replace('0', '1')).siblings().each(function () {
                            $(this).attr('src', $(this).attr('src').replace('1', '0'));
                        });
                        oo('inventory').prop('type', $(this).attr('type'));
                    }
                });
                defaultType == $(this).attr('type') && $(this).click();
            });
        });
    </script>
</asp:Content>
<asp:Content ID="mainContent" ContentPlaceHolderID="cphContent" runat="server">
    <div style="width: 900px; margin-left: 10px;">
        <uc:Category ID="ucCategory" runat="server" />
        <div>
            <input id="txtInventorySearch" /><a id="btnInventorySearch" href="#" class="easyui-linkbutton">搜索</a>
            <a href="BasketPage.aspx" class="easyui-linkbutton">前往购物车</a>
        </div>
        <div>
            <img src="../images/page/weidian0.png" type="All" />
            <img src="../images/page/weidian0.png" type="Ordered" />
            <img src="../images/page/buhuolishi0.png" type="NotOrder" />
            <img src="../images/page/xinpin0.png" type="New" />
            <img src="../images/page/rexiao0.png" type="Hot" />
        </div>
        <uc:Product ID="ucProduct" runat="server" />
    </div>
</asp:Content>
